feat(client): expose page experiment assignments via window.ILC.getEx… - #714
Merged
Merged
Conversation
…periments()
Apps that ILC does not mount for a route (embedded apps, parcels, wrapper
apps, other page scripts) never receive appProps.experiments, so they fell
back to the baseline and rendered a different variant than the rest of the
page.
window.ILC.getExperiments() returns the experiment map the server resolved
for the current document: the same ilc-state value ClientRouter merges into
route apps' appProps.experiments. Each call returns a fresh frozen copy, or a
frozen {} when there are no assignments. The value is a page snapshot and
changes only on the next full page load; no change event is added.
The change is additive: no existing window.ILC method, SSR behaviour or
appProps.experiments contract changes. docs/ab-testing.md describes the
contract for apps that don't receive appProps.
Coverage ReportIlc/serverCommit SHA:a4a10b39f33f892300af0707f2fb50010ffb6626 Test coverage results 🧪File details
Ilc/clientCommit SHA:a4a10b39f33f892300af0707f2fb50010ffb6626 Test coverage results 🧪File details
RegistryCommit SHA:a4a10b39f33f892300af0707f2fb50010ffb6626 Test coverage results 🧪File details
|
m2broth
marked this pull request as ready for review
September 28, 2026 15:43
m2broth
requested review from
stas-nc and
wRLSS
and removed request for
wRLSS
September 28, 2026 15:43
stas-nc
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apps that ILC does not mount for a route (embedded apps, parcels, wrapper apps, other page scripts) never receive appProps.experiments, so they fell back to the baseline and rendered a different variant than the rest of the page.
window.ILC.getExperiments() returns the experiment map the server resolved for the current document: the same ilc-state value ClientRouter merges into route apps' appProps.experiments. Each call returns a fresh frozen copy, or a frozen {} when there are no assignments. The value is a page snapshot and changes only on the next full page load; no change event is added.
The change is additive: no existing window.ILC method, SSR behaviour or appProps.experiments contract changes. docs/ab-testing.md describes the contract for apps that don't receive appProps.